package Day217;



public class MethodDemo {
    public static void main(String[] args) {
        int[] a = aArray(5,10);
        System.out.println("数组a的长度:"+a.length);

        int[] b =aArray(10,10);
        for(int i=0;i<b.length;i++){
            System.out.println(b[i]);
        }

    }








        /*
        int[] a=aArray();
        for(int i=0;i<a.length;i++){
            System.out.print(a[i]+"\t");
        }
        System.out.println();
        System.out.println(a[0]);
        System.out.println(a[1]);

    }

    public static void say(){
        System.out.println("大家好,很高兴认识大家");


    public static void sayHi(String name){
        System.out.println("大家好,我叫"+name+",今年20岁了");


    public static void sayHello(String name,int age){
        System.out.println("大家好,我叫"+name+",今年"+age+"岁了");

    public static void sayHome(String food,double price){
        System.out.println("这个"+food+"价格为"+price+"元");
     }

    public static int anInt(){
        return 10;
    }

    public static int demo(int a,int b){
        int c=a*b;
        return c;
    }

     */
    public static int[] aArray(int e,int f){
        int[] arr = new int[e];
        for(int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*f);
        }
        return arr;
    }























}
